package cn.gson.school.dao.jiaoxue;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import cn.gson.school.entity.jiaoxue.GradeEntity;
import cn.gson.school.entity.jiaoxue.StudentEntity;

@Repository
public interface GrandeDao extends CrudRepository<GradeEntity, Long> {

	@Query(nativeQuery=true,value="select * from tb_jx_grade where zuoye_id=?1 and student_id=?2")
	GradeEntity cxGrande(Long zuoyeId,Long studentId);
	
	List<GradeEntity> findByStudentinfoId(StudentEntity studentEntity);
}
